const express = require("express");
const router = express.Router();
const upload = require("./upload");
router.post("/upload", (req, res) => {
    upload(req, res)
        .then((url) => {
            return res.send({
                code: 0,
                message: "上传成功",
                result: {
                    url: url,
                },
            });
        })
        .catch((err) => {
            return res.response("上传失败");
        });
});

module.exports = router;
